package com.agent.vpsserver.common.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 请求基础对象,用于算法验证签名,具体请参考
 * <a href="https://www.showdoc.cc/107331442302747?page_id=664211038975257">文档</a>
 *
 * @author <a href="mailto:ludezh@dingtalk.com"> ludezh </a>
 * @version 1.0.0   2018/12/24,13:57
 * @since 1.0.0     2018/12/24,13:57
 */
@Data
@ApiModel(description = "请求对象")
public class BaseRequestDTO implements Serializable {

    private static final long serialVersionUID = -1804074689340349151L;

    /**
     * 应用版本号
     */
    @NotBlank(message = "clientVersion为空")
    @ApiModelProperty(value = "应用版本号（请求头必传）", hidden = true)
    private String clientVersion;

    /**
     * 终端平台类型
     */
    @NotNull(message = "sysType为空")
    @ApiModelProperty(value = "终端平台类型（请求头必传） 1:ANDROID 2:IOS 3:web", hidden = true)
    @Range(min = 1, max = 3, message = "终端平台类型错误")
    private Integer sysType;

    /**
     * 请求时的时间戳
     */
    @NotNull(message = "timeStamp为空")
    @ApiModelProperty(value = "请求时的13位时间戳（请求头必传）", hidden = true)
    private Long timeStamp;

    @ApiModelProperty(value = "终端设备型号,如红米20", required = true, hidden = true)
    private String deviceType;

    @ApiModelProperty(value = "终端设备品牌,如huawei xiaomi", required = true, hidden = true)
    private String deviceBrand;
}
